package com.lan.utils;

import java.util.List;
import java.util.Set;

public class Tool {

    public static int len(Object o) {
        if (o instanceof List) {
            List t = (List) o;
            return t.size();
        } else if (o instanceof String) {
            String str = (String) o;
            return str.length();
        } else if (o instanceof Set) {
            Set t = (Set) o;
            return t.size();
        }
        throw new RuntimeException("暂不支持该统计长度");
    }
}
